@charset "UTF-8";
// Copyright (C) 2019 Checkmk GmbH - License: GNU General Public License v2
// This file is part of Checkmk (https://checkmk.com). It is subject to the terms and
// conditions defined in the file COPYING, which is part of this source code package.

@use "_mixins" as *;

/* Global style used by all HTML pages, even by sidebar and
   mobile interface */

/*-------------------------------------------------------------------------.
|                ____        __             _ _                            |
|               |  _ \  ___ / _| __ _ _   _| | |_ ___                      |
|               | | | |/ _ \ |_ / _` | | | | | __/ __|                     |
|               | |_| |  __/  _| (_| | |_| | | |_\__ \                     |
|               |____/ \___|_|  \__,_|\__,_|_|\__|___/                     |
|                                                                          |
+--------------------------------------------------------------------------+
| Default values for general styles used in all parts of Multisite. These  |
| styles are used in the Status-GUI, WATO and other modules based on the   |
| basic Multisite layout. They are not used by the Mobile GUI.             |
'-------------------------------------------------------------------------*/

/* Change some general defaults of HTML that we do not like */
td,
th {
  padding: 0;
  font-weight: $font-weight-default;
  vertical-align: top;
}

div {
  padding: 0;
  margin: 0;
}

img {
  border-style: none;
}

th {
  white-space: nowrap;
}

/* Styling for input elements */
button,
input,
select,
textarea {
  padding: 3px;
  margin-top: 0;
  font-family: $font-family-default;
  vertical-align: middle;
  background-color: $white;
  border: none;
  outline-style: none;
  outline-width: medium;
}

/* consistent dropdown field styling for all browsers */
select:not([multiple]) {
  padding-right: 2.5em;
  background-image: url("images/select_arrow.png");
  background-position: right 50%;
  background-repeat: no-repeat;
  background-size: 20px 11px;
  -webkit-appearance: none; /* Removes default chrome and safari style */
  -moz-appearance: none; /* Removes default style Firefox */
}

div.popup_menu select:not([multiple]) {
  background: $popup-menu-select-bg-color url("images/select_arrow.png") right 10% / 20px 11px
    no-repeat;
}

select::-ms-expand {
  display: none;
}

input[type="file"] {
  color: $font-color-black;
}

form {
  margin: 0;

  label + input:not([type="checkbox"]) {
    margin-left: $spacing;
  }

  label.required::after {
    color: $font-color-green;
    content: " (required)";
  }

  div.submit_button_container {
    display: inline-block;
    margin-right: 2 * $spacing;

    &.disable_tooltip {
      pointer-events: none;
    }

    input[type="submit"] {
      margin-right: 0;
      pointer-events: auto;

      &.disabled {
        pointer-events: none;
        opacity: $inactive-opacity;
      }
    }
  }
}

input[type="checkbox"]:hover + label::before {
  background-color: $input-hover-bg-color;
}

td.checkbox input[type="checkbox"] + label::before {
  margin: 0;
}

/* checkbox styling */
input[type="checkbox"] {
  display: none;

  &.vue_checkbox {
    display: unset;
  }

  + label::before {
    display: inline-block;
    width: 12.5px;
    height: 12.5px;
    padding: 0;
    margin: -2px 4px 0 0;
    vertical-align: middle;
    background-color: $input-background-color;
    border: 1px $input-background-color solid;
    content: "\00a0";
  }

  &:checked {
    + label::before {
      text-align: center;
      content: "\2716";
    }
  }
}

/* Select element with icons */
select.icon option {
  height: 18px;
  padding-left: 22px;
  background-position: bottom left;
  background-repeat: no-repeat;
  background-size: 18px;
}

button,
input.button,
table.vs_duallist a.control {
  padding: 2px 6px;
  margin-left: 5px;
  color: $font-color-white;
  cursor: pointer;
  border-radius: $theme-border-radius;
}

table.vs_duallist a.control,
table.vs_duallist body.main .popup_menu span.control,
body.main .popup_menu table.vs_duallist span.control {
  background-color: $button-bg-color-default;
  box-shadow: none;
}

button,
input.button,
table.vs_duallist a.control,
.wato div.mainmenu a {
  &:hover {
    text-decoration: none;
  }

  &:active {
    box-shadow: inset 0 0 0.5px $grey-3;
  }
}

button,
input.button,
input.button:not([type="text"]),
input.button:not([type="password"]) {
  &[disabled="disabled"],
  &:disabled {
    &,
    &:hover,
    &:active {
      color: $font-color-dimmed;
      cursor: initial;
      background-color: $input-button-hover-bg-color;
      filter: grayscale(80%);
    }
  }
}

button.hot,
input.button.hot,
#confirm_icon.warn {
  &,
  &:active {
    color: $font-color-light-bg;
    background-color: $success-dimmed;
    border-color: $success-dimmed;
  }

  &:hover {
    background-color: $success;
    border-color: $success;
  }
}

/* toggle switch icon button */
a.toggle_switch {
  &:hover {
    opacity: 0.7;
  }

  img.icon.iconbutton {
    width: $toggle-switch-width;
  }

  &.large img.icon.iconbutton {
    width: $toggle-switch-width-large;
  }
}

.dots {
  margin-left: 5px;
  overflow: hidden;
  color: $font-color-dimmed;

  &.required::before {
    color: $font-color-green;
    content: "(required) ";
  }
}

/*for IE8 */
input[type="submit"]:focus {
  outline: none;
}

/* Images have a native size of 48x48 and are scaled down by the
   browser. That way if you select a zoom level in the browser,
   the quality of the images are better */

img.icon {
  width: 20px;
  height: 20px;
}

span.emblem {
  position: relative;
}

img.emblem {
  position: absolute;
  right: 3px;
  bottom: -3px;
  width: 10px;
  height: 10px;
}

td.buttons img.emblem,
table.data img.emblem {
  right: 0;
  width: 11px;
  height: 11px;
}

a.inline img.icon,
img.icon.inline,
div.icon {
  width: 16px;
  height: 16px;
  vertical-align: middle;
}

h1 {
  margin-top: 0;
  margin-bottom: 5px;
  margin-left: 5px;
  font-size: $font-size-page-title;
  color: $font-color-white;
}

div.livestatus.message {
  position: fixed;
  bottom: -10px;
  left: 10px;
  z-index: 20;
}

/*-------------------------------------------------------------------------.
|                _____     _     _       _     _                           |
|               |  ___|__ | | __| | __ _| |__ | | ___                      |
|               | |_ / _ \| |/ _` |/ _` | '_ \| |/ _ \                     |
|               |  _| (_) | | (_| | (_| | |_) | |  __/                     |
|               |_|  \___/|_|\__,_|\__,_|_.__/|_|\___|                     |
|                                                                          |
+--------------------------------------------------------------------------+
| These styles are used by the {begin,end}_foldable_container() functions. |
'-------------------------------------------------------------------------*/

img.treeangle {
  width: 8px;
  height: 8px;
  margin: 0 3px;
  vertical-align: middle;
  cursor: pointer;
  transition: transform 0.2s ease-in-out;

  &.open {
    transform: rotate(90deg);
  }

  &.nform {
    margin-left: -5px;
  }

  &.title {
    margin-right: 5px;
    vertical-align: middle;
    filter: none;
  }
}

b.treeangle.title {
  font-weight: $font-weight-bold;
  color: $font-color;
  cursor: pointer;
}

div.foldable_wrapper {
  margin-top: $spacing;
  background-color: $headline-color;
  border-radius: $border-radius-top;

  &:not(:last-of-type) {
    margin-bottom: 2 * $spacing;
  }

  div.foldable_header {
    position: sticky;
    top: 0;
    z-index: 15;
    background-color: $headline-color;

    &[onclick] {
      cursor: pointer;
    }

    img.treeangle {
      float: left;
      margin: $spacing $spacing 0;
    }

    b.treeangle.title {
      margin: 6px 0;
    }

    h3 {
      padding-left: 0;
      margin-top: 0;
    }
  }

  ul.treeangle {
    margin: 0;
  }
}

img.treeangle + .treeangle.title {
  margin: 0;
}

ul.treeangle {
  position: relative; /* In order for placement of invtablelink */
  padding-left: 20px;
  margin: 8px 0;

  li:not(.show_more_mode):not(.basic) {
    display: block;
    padding-left: 20px;
    margin: 0;
    list-style: disc;

    &:not(.single) {
      margin-left: 16px;
    }
  }
}

ul.closed {
  display: none;
}

/*-------------------------------------------------------------------------.
|             __  __                                                       |
|            |  \/  | ___  ___ ___  __ _  __ _  ___  ___                   |
|            | |\/| |/ _ \/ __/ __|/ _` |/ _` |/ _ \/ __|                  |
|            | |  | |  __/\__ \__ \ (_| | (_| |  __/\__ \                  |
|            |_|  |_|\___||___/___/\__,_|\__, |\___||___/                  |
|                                        |___/                             |
+--------------------------------------------------------------------------+
| Styles for messages-boxes in various situations (called by htmllib.py)   |
'-------------------------------------------------------------------------*/

div.really,
div.success,
div.error,
div.message,
div.warning {
  padding: 16px;
  margin: $spacing 0;
  border-radius: $theme-border-radius;
  box-shadow: none;

  h1 {
    margin-bottom: 5px;
    margin-left: 0;
    font-size: $font-size-large;
    font-weight: $font-weight-bold;
    color: $font-color-white;
  }

  input.button {
    padding: 8px 16px;
    margin-top: 0;
    margin-bottom: 0;
  }
}

div.really {
  &,
  h3,
  body.main & a {
    color: $font-color-black;
    background-color: $warning;
  }

  h3 {
    padding: 0;
    margin: 0;
  }

  ul {
    margin: $spacing 0;
  }

  input.button {
    margin-top: $spacing;
    margin-left: 0;
  }

  ul + input.button {
    margin: 0 $spacing;
  }

  &.hidden {
    display: none;
  }
}

div.success {
  background-color: $headline-color;
}

div.message {
  background-color: $input-background-color;
}

div.error {
  color: $font-color-light-grey;
  background-color: $color-state-2-background;

  a,
  a:link {
    color: $font-color-white;
  }

  tt {
    color: inherit;
  }
}

.success.flashed {
  @include flashed-mixin($success, url("images/icon_checkmark.svg"));
}

.warning.flashed {
  @include flashed-mixin($yellow, url("images/icon_problem.svg"));
}

// TODO: what is using this? can we remove it?
.warning:not(.flashed),
body.main div.warning:not(.flashed) {
  color: $font-color-black;
  background-color: $warning;

  a,
  a:link {
    color: $font-color-black;
  }
}

form.confirm {
  margin-top: $spacing;
}

/* Warnings embedded in tables without margins and padding, those are
   just needed for body */

h2,
h3 {
  margin-bottom: $h3-margin-bottom;

  + div.info,
  + div.success {
    padding: $wato-info-padding;
    padding-top: 10px;
    margin-top: 0;
    background-color: $data-container-bg-color;
  }

  + div.success {
    margin-bottom: 0; // don't leave a spacing between the directly following table
  }
}

td div.warning,
td > div.error {
  padding: 5px 10px;
  margin-top: 3px;
  margin-bottom: 3px;

  ul {
    padding-left: 0;
    margin: 5px 10px;
  }
}

/*-ValueSpec---------------------------------------------------------------.
|          __     __    _            ____                                  |
|          \ \   / /_ _| |_   _  ___/ ___| _ __   ___  ___                 |
|           \ \ / / _` | | | | |/ _ \___ \| '_ \ / _ \/ __|                |
|            \ V / (_| | | |_| |  __/___) | |_) |  __/ (__                 |
|             \_/ \__,_|_|\__,_|\___|____/| .__/ \___|\___|                |
|                                         |_|                              |
+--------------------------------------------------------------------------+
| Styles needed for HTML code produced by valuespec.py.                    |
'-------------------------------------------------------------------------*/

table.dictionary {
  &:not(.horizontal) {
    width: 100%;
  }
  border-collapse: collapse;

  b.header {
    font-size: $font-size-small;
    font-weight: $font-weight-default;
  }

  td.dictright {
    width: 99%;
    padding: 0;
    white-space: nowrap;
    border-style: none;
  }

  td.horizontal {
    padding-right: 5px;
  }

  td.dictleft {
    &:not(.horizontal) {
      width: 1%;
    }
    white-space: nowrap;

    span.required {
      color: $font-color-green;
    }

    div.popup_menu {
      white-space: normal;
    }

    div.help {
      white-space: normal;
    }

    > span {
      margin: $input-field-margin;
    }
  }
}

td.dictleft {
  &.horizontal div.dictelement[id*="DictGroup"] {
    margin-bottom: 0;
  }
  div.dictelement {
    float: none;
    margin-top: 3px;
    margin-left: 0;
    margin-bottom: 10px;

    &:empty {
      margin: 0;
    }

    &.indent {
      &:not(div[id*="DictGroup"]) {
        padding-left: 10px;
        margin-left: 6px;
        border-left: 2px solid $line-color;
      }

      ul {
        margin-top: 1px;
      }
    }
  }
}

table.vs_dict_text {
  padding: 0;
  margin: 0;
  border-collapse: collapse;

  td,
  table.data tr td & > tbody > tr > td {
    padding: 0;
    margin: 0;
    vertical-align: top;
  }
}

table.valuespec_tuple {
  border-collapse: collapse;

  &.horizontal tr:nth-child(1) td {
    padding-top: 0; // override nform default
  }

  td {
    padding: 0;

    &.tuple_left {
      vertical-align: middle;
    }

    &.tuple_right.has_title > span.vs_fixed_value {
      @include floating-text-mixin;
    }

    &.tuple_td {
      &,
      sup {
        vertical-align: top;
      }
    }
  }

  span.title {
    font-size: $font-size-small;
  }
}

table.vs_date {
  display: inline-block;
  vertical-align: middle;
  border-spacing: 0;

  td {
    padding-top: 0;
    padding-right: 3px;
  }

  th {
    padding: 0;
    font-size: $font-size-small;
    font-weight: $font-weight-default;
    text-align: center;
  }
}

table.valuespec_listof {
  width: 100%;

  .unused {
    display: none;
  }

  tr:first-child > td {
    &.vlof_buttons,
    &.vlof_content {
      padding-top: 0;
    }

    &.vlof_buttons {
      padding-bottom: $spacing-half;
    }
  }
}

div.valuespec_listof {
  table {
    border-collapse: collapse;
  }

  &.floating > table > tbody > tr > td:first-child {
    vertical-align: top;
  }
}

div.valuespec_listof_floating_container {
  margin-top: -4px;
  vertical-align: top;

  > table {
    float: left;

    td {
      vertical-align: top;

      &.vlof_buttons img {
        width: 12px;
        height: 15px;
        margin-top: 4px;
      }

      &.vlof_content .tagify {
        tag {
          margin: 4px 5px 2px 4px;

          x {
            display: none;
          }

          > div {
            padding-right: 0.3em;
          }
        }

        span.tagify__input {
          margin: 3px 5px 2px 4px;
        }
      }
    }
  }
}

table.nform
  table.valuespec_listof
  div.valuespec_listof_floating_container
  > table
  > tbody
  > tr
  > td {
  border-bottom: none;
}

table.vs_duallist {
  td {
    width: 50%;

    select {
      width: 100%;
      height: 200px;
      resize: both;
    }

    &.head {
      text-align: center;
    }
  }

  a.control {
    display: inline-block;
    float: right;
    width: 14px;
    text-align: center;
    text-decoration: none;

    &:hover {
      text-decoration: none;
      background-color: $duallist-control-a-hover-bg-color;
    }

    &.add {
      float: right;
    }

    &.del {
      float: left;
    }
  }
}

textarea.tt {
  font-family: $font-family-monospace;
}

div.listofstrings.horizontal {
  clear: left;

  > div {
    float: left;
  }
}

table.listchoice {
  border-collapse: collapse;

  td {
    height: 12px;
    padding: 0;
    margin: 0;

    span.checkbox {
      height: $input-field-height;
    }

    input[type="checkbox"] {
      height: 12px;
      margin: 0;
    }
  }
}

table.alternative {
  border-collapse: collapse;

  td:first-child {
    padding-right: 0.5 * $spacing;
  }
}

div.popup_container {
  position: relative;
}

div#hover_menu {
  position: absolute;
  /* The hover menu needs to have a higher z-index than the highest element
     on the pages. In this case it was the perfometer which had 30. */
  z-index: 50;
  width: auto;
  color: $font-color;

  div.error,
  div.message {
    width: 350px;
    margin: 0;
  }

  div.message {
    color: $font-color;
    background-color: $bg-color;
  }

  .graph_container {
    display: block;
    float: left;
    margin: 0 2px 2px 0;
    color: $font-color;
    background-color: $graph-hover-popup-bg-color;
    border: $graph-hover-popup-border;
    box-shadow: $graph-hover-popup-box-shadow;

    div.title {
      display: block;
    }

    div.time {
      letter-spacing: 0;
    }
  }
}

/* Color picker styling */

div.popup_trigger.colorpicker div.popup_menu {
  min-width: auto;
}

.cp-preview {
  width: 28px;
  height: 18px;
  border: 1px solid $darkgrey;
  border-radius: $theme-border-radius;
  box-shadow: none;

  table.data td & {
    position: relative;
    top: 2px;
  }
}

.picker-wrapper,
.slide-wrapper {
  position: relative;
  float: left;
}

.picker-indicator,
.slide-indicator {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
}

.picker,
.slide {
  float: left;
  cursor: crosshair;
}

.cp-small {
  float: left;
  width: 170px;

  .picker {
    width: 150px;
    height: 150px;
    background-color: $white;
  }

  .slide {
    width: 15px;
    height: 150px;
  }

  .slide-wrapper {
    margin-left: 5px;
  }

  .picker-indicator {
    width: 1px;
    height: 1px;
    background-color: $white;
    border: 1px solid $black;
  }

  .slide-indicator {
    left: 0;
    width: 100%;
    height: 2px;
    background-color: $black;
  }
}

.cp-input {
  float: left;
  margin-top: 2px;
  color: $font-color;

  input,
  select,
  textarea,
  div.snapin select,
  div.snapin & select,
  #mk_side_search_field {
    margin: 0;
    margin-bottom: 8px;
  }

  input {
    width: 106px;
  }
}

div.popup_trigger.colorpicker .popup_menu {
  top: 17px;
  left: 26px;
}

/*--Werks------------------------------------------------------------------.
|                    __        __        _                                 |
|                    \ \      / /__ _ __| | _____                          |
|                     \ \ /\ / / _ \ '__| |/ / __|                         |
|                      \ V  V /  __/ |  |   <\__ \                         |
|                       \_/\_/ \___|_|  |_|\_\___/                         |
|                                                                          |
+--------------------------------------------------------------------------+
| Pages showing the Check_MK change log (werks.py)                         |
'-------------------------------------------------------------------------*/

tr.data td.werklevel,
tr.data td.werkclass,
tr.data td.werkcomp {
  width: 100px;
  text-align: center;
  white-space: nowrap;
}

table.data.werks {
  td {
    &.werkclassfeature,
    &.werkclassfix,
    &.werklevel2,
    &.werklevel3,
    &.werkcompincomp_ack {
      color: $font-color-light-bg;
    }

    &.werklevel2 {
      background-color: $color-state-5-background;
    }

    &.werklevel3 {
      font-weight: $font-weight-bold;
      background-color: $color-state-6-background;
    }

    &.werkclassfeature {
      background-color: $color-state-success-background;
    }

    &.werkclassfix {
      background-color: $color-state-1-background;
    }

    &.werkclasssecurity {
      font-weight: $font-weight-bold;
      color: $font-color-white;
      background-color: $color-state-2-background;
    }

    &.werkcompincomp_unack {
      font-weight: $font-weight-bold;
      background-color: $color-state-7-background;
    }

    &.werkcompincomp_ack {
      background-color: $color-state-8-background;
    }
  }

  &.headerleft td {
    text-align: left;
  }
}

table.werks td a {
  color: $font-color-black;
  text-decoration: underline;
}

/* NOWIKI formatting in Werks */
td.nowiki {
  h3 {
    font-size: $font-size-large;
    font-weight: $font-weight-bold;
  }

  pre {
    padding: 3px 8px;

    &.code {
      color: $font-color-light-bg;
      background-color: $white;
    }

    &.file {
      color: $font-color-light-bg;
      background-color: $info-light;
    }
  }

  div.filename {
    padding: 3px 8px;
    margin-bottom: -12px;
    font-weight: $font-weight-bold;
    color: $font-color-light-bg;
    background-color: $info;
  }
}

/* Command for modifying existing downtimes */
table.modifydowntimes > tbody > tr {
  > td:nth-child(1) {
    padding-top: 10px;
    vertical-align: middle;
  }

  &:nth-child(1) > td:nth-child(1) {
    padding-top: 0;
  }
}

.select2-container .select2-selection--single {
  height: $input-field-height;
  border: none;
}

.select2-container--default {
  .select2-results {
    color: $font-color-black;
  }

  .select2-selection--single {
    border-radius: 4px;

    .select2-selection__rendered {
      line-height: $input-field-height;
      color: $font-color;
    }

    .select2-selection__arrow b {
      margin-top: -4px;
    }
  }

  .select2-dropdown {
    background-color: $input-background-color;
    border: 1px solid $input-dropdown-border-color;
  }

  .select2-results__option {
    color: $font-color;
    background-color: $input-background-color;
    @include ellipsis-text-overflow;
  }

  .select2-results__option[aria-selected="true"] {
    background-color: $input-background-color;
  }

  .select2-results__option--highlighted[aria-selected] {
    color: $font-color-green;
    background-color: $input-background-color;
  }

  .select2-search--dropdown .select2-search__field {
    background-color: $input-nested-background-color;
    border: none;
  }
}

div.vs_age.inline {
  display: inline-block;
}

/* TODO: Go through these following styles and move them to specific scss
 *       where needed
 */
* {
  font-size: inherit;
  letter-spacing: $letter-spacing-default;
  text-shadow: none;
}

html {
  font-size: $font-size-normal;
  height: 100%;
}

.link,
.title {
  display: inline-block;
  padding: 0 2px; /* affects spacing in sidebar plugins */
  font-weight: $font-weight-default;
  letter-spacing: $letter-spacing-table;
  color: $font-color;
  transition: color 0.15s ease-in-out;
}

div.graph {
  &.preview {
    padding: 4px !important;
  }

  table.legend th {
    border-bottom: $graph-legend-th-border-bottom;
  }

  &.brokengraph {
    box-shadow: none;

    div.title {
      padding: 8px;
    }

    pre {
      padding: 0 8px 8px;
      margin: 0;
    }
  }
}

div.graph_hover_popup {
  color: $font-color;
  background-color: $graph-hover-popup-bg-color;
  border: $graph-hover-popup-border;
  box-shadow: $graph-hover-popup-box-shadow;
}

.graph {
  background-color: null;
}

div.content {
  top: 64px;
  width: 100%;
  padding: $spacing;
  box-sizing: border-box;
}

.bi_rule_tree img.treeangle,
.invtree img.treeangle,
.grouped_row_header img.treeangle.nform,
.aggrtree img.treeangle {
  &,
  body.main & {
    &.open,
    &.closed {
      margin: 1px 4px 0;
    }
  }
}

table td {
  vertical-align: middle;
}

div.metricchoice select,
div.metricchoice input,
div.metricchoice select,
div.metricchoice textarea,
div.metricchoice #mk_side_search_field {
  margin: 4px 0;
}

td.title {
  display: table-cell;
}

select.vlof_filter {
  width: auto;
}

body.main.visible div.foldable .title {
  color: $font-color;
}

.hot:not(.entry) {
  a,
  span {
    // highlighted suggestion buttons used e.g. in "Bake agents"
    color: $font-color-light-bg !important;
    background-color: $hot-bg-color !important;
  }
}

div.info {
  margin: 16px 0 8px;
  font-weight: $font-weight-default;
  letter-spacing: $letter-spacing-default;
  color: $font-color;
}

.age {
  input,
  select,
  textarea,
  div.snapin select,
  div.snapin & select,
  #mk_side_search_field {
    box-sizing: content-box;
  }
}

body.main a,
body.main .popup_menu span,
body.main .popup_menu a,
body.main a:link,
body.main a:visited {
  color: $font-color;
}

img.glass {
  display: none;
}

tr.hidden {
  display: none;
}

// In the case of both scrollbars being visible, the padding of #main_page_content doesn't work
// in views, so we need additional padding on the within #data_container.
// We need this "> .simplebar-*" chain to make sure to only select the direct child div of
// #main_page_content
#main_page_content.simplebar-scrollable-x.simplebar-scrollable-y
  > .simplebar-wrapper
  > .simplebar-mask
  > .simplebar-offset
  > .simplebar-content-wrapper
  > .simplebar-content
  > div#data_container {
  padding-right: $simplebar-track-width;
}

.simplebar-scrollbar::before {
  background: $simplebar-scrollbar-color;
  border-radius: 2px;
}

.simplebar-track {
  &.simplebar-vertical {
    width: $simplebar-track-width;

    div.simplebar-scrollbar::before {
      left: 3px;
      width: $simplebar-scrollbar-width;
    }
  }

  &.simplebar-horizontal {
    height: $spacing-double;

    div.simplebar-scrollbar:before {
      top: $spacing-half;
      height: $simplebar-scrollbar-width;
    }
  }
}

.simplebar-scrollbar.simplebar-visible::before {
  opacity: 1;
}

div#row_info {
  padding-bottom: $spacing-half;
  font-weight: $font-weight-default;
  text-align: right;
}

/* Inside a foldable, we need a different color here in order to see a difference w.r.t. the title*/
div.foldable div.success {
  background-color: $base-color;
}

input.hidden_submit {
  display: none;
}

.underline {
  text-decoration: underline;
}

.italic {
  font-style: italic;
}

// Sweetalert2
// JS library used for confirm dialogs and success/error msg popups
// (see the "Swal" call sites in our typescript code)
div.swal2-popup {
  background-color: $bg-color-secondary;

  div.swal2-icon {
    border-color: $success-dimmed;
    color: $success-dimmed;
  }

  h2.swal2-title,
  div.swal2-html-container {
    color: $font-color;
  }

  div.swal2-html-container {
    white-space: pre-line;
  }

  button.swal2-confirm {
    background-color: $success-dimmed;
  }
}

svg text {
  fill: $font-color;
}

/* Hide native scrollbar when Vue components handle scrolling */
body.main div#main_page_content.vue-scrolling {
  overflow: hidden;
  height: 100%;
  padding-right: 0;
  padding-bottom: 0;

  > * {
    height: 100%;
    display: block;

    > .cmk-vue-app {
      height: 100%;
      display: block;
    }
  }
}
